# -*- coding: utf-8 -*-

import arcpy
import codecs

arcpy.env.workspace = r"E:\重做\素材库.mdb"
qsfile = codecs.open(r"E:\zd.qs","w","utf-8")
with arcpy.da.SearchCursor("项目范围去除旧路",["地块","面积","说明","OID@","SHAPE@"]) as cursor:
    for each in cursor:
        # print each[4],each[5]
        qsfile.write(each[2]+"\n")
        qsfile.write(each[0] + "\n")
        qsfile.write("102" + "\n")
        count = 1
        for part in each[4]:
            for each_point in part:
                qsfile.write(str(count) + "\n")
                qsfile.write(str(each_point.X) + "\n")
                qsfile.write(str(each_point.Y) + "\n")
                count +=1
        qsfile.write("E,"+str(each[1])+"\n")
    qsfile.write("E")
qsfile.close()